package com.cis467.mrball.parts;

import com.cis467.mrball.SharedConstants;

public class LevelWrapper {

	// The actual level object
	public Level mLevel;
	
	// The meta information about the level
	public String mCreator;
	public String mLevelName;
	public String mLevelBatch;
	public int mLevelNumber;
	public long mPersonalBest;
	public long mWorldRecord;
	public int mLocalVote;
	
	// To be used only by the cursor conversion method
	public LevelWrapper() {
	}
	
	public LevelWrapper(Level level, String creator, String levelName) {
		
		this(level, creator, levelName, SharedConstants.NO_BATCH, SharedConstants.NO_LEVEL_NUMBER);		
	}
	
	public LevelWrapper(Level level, String creator, String levelName, String levelBatch , int levelNumber) {
		
		mLevel = level;
		mCreator = creator;
		mLevelName = levelName;
		mLevelBatch = levelBatch;
		mLevelNumber = levelNumber;
		mPersonalBest = SharedConstants.NO_PERSONAL_BEST;
		mWorldRecord = SharedConstants.NO_WORLD_RECORD;
		mLocalVote = SharedConstants.VOTE_NONE;
		
	}
	
	public void setupLevel(boolean startVisible) {
		try {
			mLevel.setup(startVisible);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
